<template>
    <el-dialog :model-value="props.visible" title="财务审核" width="49%" @close="handleClose">
        <template #header>
            <div class="header">
                <h3 class="title">财务审核</h3>
                <el-icon class="tips-icon">
                    <QuestionFilled />
                </el-icon>
                <span class="tips">微信转账的情况下付款人=LOGO名称，预付款抵扣上传的图片是预付款的流水明细单截图，付款日期，付款金额必须完全属实方可通过审核，否则不作为通过资格。</span>
            </div>
        </template>
        <div class="financeExamine">
            <el-descriptions :column="3">
                <el-descriptions-item label="客户名称：">山西北欧时光</el-descriptions-item>
                <el-descriptions-item label="订单总价：">500元</el-descriptions-item>
                <el-descriptions-item label="合计总价：">500元</el-descriptions-item>
            </el-descriptions>
            <salerExamineRecord v-for="(item, index) in examineDetail" :key="item.id" ref="examineRecordRefs" :examineDetail="item" :index="index" :pay_type="props.payType" :shopNames="item.paymentMethod == '1'?props.onlineMethod:props.offlineMehtod"  />
        </div>
        <template #footer>
            <div class="dialog-footer">
                <el-button  type="primary">确 定</el-button>
                <el-button @click="handleClose">取 消</el-button>
            </div>
        </template>
    </el-dialog>
</template>

<script setup lang="ts">
import type { FormInstance } from 'element-plus';
import salerExamineRecord from './salerExamineRecord.vue';

const props = defineProps<{
    visible: boolean,
    onlineMethod: any[],
    offlineMehtod: any[],
    payType: any[]
}>();
const emits = defineEmits(['close','submit']);
const formRef = ref<FormInstance>();

const examineDetail = ref<any[]>([
    {
        id: 1,
        money: 100,
        paymentDate: '2024-12-20',
        paymentMethod: '2',
        shopName: '5',
        createByName: 'ddd',
        sampleNumber: 0
    },
    {
        id: 2,
        money: 200,
        paymentDate: '2024-12-21',
        paymentMethod: '2',
        shopName: '3',
        createByName: 'ddd',
        sampleNumber: 1
    }
]);

const handleClose = () => {
    emits('close');
};

</script>

<style lang="scss" scoped>
.header{
    display: flex;
    align-items: center;
    .title{
        width: 100px;
    }
    .el-icon{
        margin-left:10px;
    };
    .tips-icon:hover + .tips{
        visibility: visible;
    }
    .tips{
        color: red;
        font-size: 15px;
        margin-left: 15px;
        visibility: hidden;
    }
}
.contract-info{
    font-weight: bolder;
}

::v-deep(.el-input__wrapper){
    width:100%
}
.financeExamine{
    padding: 0 20px !important;
}
</style>